<h2>短信发送记录</h2>
<?php echo CHtml::beginForm(array('search_sms'),'post');?>
<table  style="margin: 0 auto;"  width="1110">
<tr><td>
	收信人：<input type="text" name="keys[receiver_name]" size="4" value="<?php echo isset($_GET['keys']['receiver_name'])?$_GET['keys']['receiver_name']:'';?>"/>
	发送用户名：<input type="text" name="keys[send_user]" size="7" value="<?php echo isset($_GET['keys']['send_user'])?$_GET['keys']['send_user']:'';?>"/>
	发送用户姓名：<input type="text" name="keys[send_user_name]" size="4" value="<?php echo isset($_GET['keys']['send_user_name'])?$_GET['keys']['send_user_name']:'';?>"/>
	添加时间：从<input type="text" id="keys[s_date]" name="keys[s_date]" size="7" value="<?php echo isset($_GET['keys']['s_date'])?$_GET['keys']['s_date']:'';?>"/>
	<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'keys[s_date]','ifFormat'=>'%Y-%m-%d'));?>
	至<input type="text" id="keys[e_date]" name="keys[e_date]" size="7" value="<?php echo isset($_GET['keys']['e_date'])?$_GET['keys']['e_date']:'';?>"/>
	<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'keys[e_date]','ifFormat'=>'%Y-%m-%d'));?>
	模糊查询：<input type="radio" name="keys[blur]" value="1" checked/>是  
	<input type="radio" name="keys[blur]" value="0" <?php echo isset($_GET['keys']['blur'])&&$_GET['keys']['blur']==0?'checked':'';?>/>否 
	<input type="submit" value="搜索"/>
</td></tr></table>
<?php echo CHtml::endForm();?>
<table class="dataGrid">
  <thead>
  <tr>
    <th><?php echo $sort->link('receiver_name'); ?></th>
    <th><?php echo $sort->link('mobile_no'); ?></th>
    <th><?php echo $sort->link('msg'); ?></th>
    <th><?php echo $sort->link('send_user'); ?></th>
    <th><?php echo $sort->link('send_user_name'); ?></th>
    <th><?php echo $sort->link('sent'); ?></th>
    <th><?php echo $sort->link('send_time'); ?></th>
    <th><?php echo $sort->link('create_time'); ?></th>
  </tr>
  </thead>
  <tbody>
<?php foreach($models as $n=>$model): ?>
  <tr class="<?php echo $n%2?'even':'odd';?>">
  	<?php 
    	$url=array('show_sms','id'=>$model->id)+$_GET;//把所有参数包括页码、查询参数传入显示信息页面
    	$url['ret']='search_sms';
    ?>
    <td><?php echo CHtml::link($model->receiver_name,$url); ?></td>
    <td><?php echo CHtml::encode($model->mobile_no); ?></td>
    <td><?php echo CHtml::encode($model->msg); ?></td>
    <td><?php echo CHtml::encode($model->send_user); ?></td>
    <td><?php echo CHtml::encode($model->send_user_name); ?></td>
    <td><?php echo CHtml::encode($model->getSentName()); ?></td>
    <td><?php echo CHtml::encode($model->send_time); ?></td>
    <td><?php echo CHtml::encode($model->create_time); ?></td>
  </tr>
<?php endforeach; ?>
  </tbody>
</table>
<br/>
<?php $this->widget('CLinkPager',array('pages'=>$pages)); ?>